package cn.easybuy.web;

import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import cn.easybuy.biz.Easybuy_Newsbiz;
import cn.easybuy.biz.Impl.Easybuy_NewsbizImpl;
import cn.easybuy.entity.Easybuy_News;

public class NewsText implements ServletContextListener {
	Easybuy_Newsbiz ea = new Easybuy_NewsbizImpl();

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		// TODO Auto-generated method stub

	}

	@Override
	public void contextInitialized(ServletContextEvent servletContextEvent) {
		ServletContext application = servletContextEvent.getServletContext();
		List<Easybuy_News> list = ea.getNews();
		application.setAttribute("ROPIC_NEWS", list);
	}
}
